package top.lywivan.mm.controller;

import top.lywivan.mm.entity.Result;
import top.lywivan.mm.pojo.Company;
import top.lywivan.mm.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/company")
public class CompanyController {

    @Autowired
    private CompanyService companyService;

    @GetMapping("/findListAll")
    public Result findListAllCompany(){
        List<Company> list = companyService.findListAllCompany();
        return new Result(true,"查询所有公司成功",list);
    }
}
